<template>
  <div>
    <div v-if="backHome">
      <BackHome></BackHome>
    </div>
    <div v-else>
      <el-button type="success" @click="loadBackHome">进去后台</el-button>
      <el-button type="success" @click="loadMyIndex">进去首页</el-button>
    </div>


  </div>

</template>

<script>
  import BackHome from "./backstage/BackHome";
  export default {
    name:'Home',
    data(){
      return{
        backHome:false
      }
    },
    created() {

    },
    mounted() {
    },
    methods:{
      loadBackHome(){
        this.backHome=true;
        // this.backHome=this.$store.state.backHome;
      },
      loadMyIndex(){
        this.$router.push('/MyIndex');
      },

    },
    components:{
      BackHome
    }
  };
</script>

<style scoped>
  #app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #2c3e50;
  }

  #nav {
    padding: 30px;
  }

  #nav a {
    font-weight: bold;
    color: #2c3e50;
  }

  #nav a.router-link-exact-active {
    color: #42b983;
  }
</style>
